//
//  selectview.m
//  jiaxingOASystem
//
//  Created by michael on 16/6/12.
//  Copyright © 2016年 czd. All rights reserved.
//

#import "selectview.h"

@interface selectview ()
@property(nonatomic,strong)UIButton * selectedButton;
@property (weak, nonatomic) IBOutlet UIButton *noOrder;
@end
@implementation selectview

- (IBAction)didCheckBox:(id)sender {
    UIButton * btn = (UIButton*)sender;
//        UIButton * btn = (UIButton *)[self  viewWithTag:sender];

    self.selectedButton.selected = NO;
    btn.selected = YES;
    self.selectedButton = btn;
    self.orderString = [NSString stringWithFormat:@"%ld",(long)btn.tag];
    NSLog(@"---%@",_orderString);
    
    [[NSNotificationCenter defaultCenter] postNotificationName:@"2" object:@{@"text":_orderString}];
    
}

-(void)awakeFromNib{

    self.autoresizingMask = UIViewAutoresizingNone;
    
    
    UIButton *bt = (UIButton *)[self  viewWithTag:1];
        self.selectedButton.selected = NO;
    bt.selected = YES;

    self.selectedButton = bt;
    
//    [self didCheckBox:2];
   
}


//- (void)setStr:(NSString *)id{
//
//_str = id;
// return [[[NSBundle mainBundle] loadNibNamed:@"selectview" owner:nil options:nil] lastObject];
//
//}
+(instancetype)checkBoxFootView{



    return [[[NSBundle mainBundle] loadNibNamed:@"selectview" owner:nil options:nil] lastObject];
}


@end
